package jbp.entity;

import jbp.core.JbpBaseEntity;
import jbp.domain.sysuser.SysUserDetailDto;
import jbp.domain.sysuser.SysUserListDto;

import java.util.Date;

public class SysUserEntity extends JbpBaseEntity<Long> {
    private String UserCode;
    private String UserName;
    private String Password;
    private String RealName;
    private String NickName;
    private int Sex;
    private int Age;
    private String Telphone;
    private Date Birthday;
    private String Mobile;
    private String openid;
    private String accesstoken;
    private String photo;
    private String OICQ;
    private String Email;
    private String DefaultPage;

    public String getUserCode() {
        return UserCode;
    }

    public void setUserCode(String userCode) {
        UserCode = userCode;
    }

    public String getUserName() {
        return UserName;
    }

    public void setUserName(String userName) {
        UserName = userName;
    }

    public String getPassword() {
        return Password;
    }

    public void setPassword(String password) {
        Password = password;
    }

    public String getRealName() {
        return RealName;
    }

    public void setRealName(String realName) {
        RealName = realName;
    }

    public String getNickName() {
        return NickName;
    }

    public void setNickName(String nickName) {
        NickName = nickName;
    }

    public int getSex() {
        return Sex;
    }

    public void setSex(int sex) {
        Sex = sex;
    }

    public int getAge() {
        return Age;
    }

    public void setAge(int age) {
        Age = age;
    }

    public String getTelphone() {
        return Telphone;
    }

    public void setTelphone(String telphone) {
        Telphone = telphone;
    }

    public Date getBirthday() {
        return Birthday;
    }

    public void setBirthday(Date birthday) {
        Birthday = birthday;
    }

    public String getMobile() {
        return Mobile;
    }

    public void setMobile(String mobile) {
        Mobile = mobile;
    }

    public String getOpenid() {
        return openid;
    }

    public void setOpenid(String openid) {
        this.openid = openid;
    }

    public String getAccesstoken() {
        return accesstoken;
    }

    public void setAccesstoken(String accesstoken) {
        this.accesstoken = accesstoken;
    }

    public String getPhoto() {
        return photo;
    }

    public void setPhoto(String photo) {
        this.photo = photo;
    }

    public String getOICQ() {
        return OICQ;
    }

    public void setOICQ(String OICQ) {
        this.OICQ = OICQ;
    }

    public String getEmail() {
        return Email;
    }

    public void setEmail(String email) {
        Email = email;
    }

    public String getDefaultPage() {
        return DefaultPage;
    }

    public void setDefaultPage(String defaultPage) {
        DefaultPage = defaultPage;
    }

    /**
     * 数据实体转化为数据传输对象
     * @return
     */
    public SysUserListDto toListDto(){
        SysUserListDto listDto = new SysUserListDto();
        listDto.setID(this.getId());
        return listDto;
    }

    /**
     * 数据实体转化为数据传输对象
     * @return
     */
    public SysUserDetailDto toDetailDto(){
        SysUserDetailDto detailDto = new SysUserDetailDto();
        detailDto.setID(this.getId());
        return detailDto;
    }
}
